<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>class DEBUGGER__::Config - debug: Ruby Standard Library Documentation</title>


<script src="../js/navigation.js" defer></script>
<script src="../js/search.js" defer></script>
<script src="../js/search_index.js" defer></script>
<script src="../js/searcher.js" defer></script>
<script src="../js/darkfish.js" defer></script>

<script src="../js/jquery-3.2.0.min.js"></script>

<script src="../js/vue.min.js"></script>
<script src="../js/js.cookie.min.js"></script>

<link href="../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../css/rdoc.css" rel="stylesheet">
<link href="../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
  var index_rel_prefix = "../";
  var darkModeCsseHref = "../css/rdoc-dm.css"
  var defaultModeCssHref = "../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="class">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <p class="link"><a href="../Object.html">Object</a>
</div>

        
        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-c-config">::config</a>
    <li ><a href="#method-c-config_to_env_hash">::config_to_env_hash</a>
    <li ><a href="#method-c-new">::new</a>
    <li ><a href="#method-c-parse_argv">::parse_argv</a>
    <li ><a href="#method-c-parse_config_value">::parse_config_value</a>
    <li ><a href="#method-i-5B-5D">#[]</a>
    <li ><a href="#method-i-5B-5D-3D">#[]=</a>
    <li ><a href="#method-i-append_config">#append_config</a>
    <li ><a href="#method-i-config">#config</a>
    <li ><a href="#method-i-disable_sigdump">#disable_sigdump</a>
    <li ><a href="#method-i-enable_sigdump">#enable_sigdump</a>
    <li ><a href="#method-i-if_updated">#if_updated</a>
    <li ><a href="#method-i-inspect">#inspect</a>
    <li ><a href="#method-i-parse_config_value">#parse_config_value</a>
    <li ><a href="#method-i-set_config">#set_config</a>
    <li ><a href="#method-i-setup_sigdump">#setup_sigdump</a>
    <li ><a href="#method-i-update">#update</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="class-DEBUGGER__::Config">
    <h1 id="class-DEBUGGER__::Config" class="class">
      class DEBUGGER__::Config
    </h1>

    <section class="description">
    
    </section>

      <section id="5Buntitled-5D" class="documentation-section">





                <section id="public-class-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Class Methods</h3>
                </header>

                  <div id="method-c-config" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">config</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="config-source">
            <pre><span class="ruby-comment"># File debug-1.8.0/lib/debug/config.rb, line 63</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">config</span>
  <span class="ruby-ivar">@config</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-config_to_env_hash" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">config_to_env_hash</span><span
                                class="method-args">(config)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="config_to_env_hash-source">
            <pre><span class="ruby-comment"># File debug-1.8.0/lib/debug/config.rb, line 422</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">config_to_env_hash</span> <span class="ruby-identifier">config</span>
  <span class="ruby-constant">CONFIG_MAP</span>.<span class="ruby-identifier">each_with_object</span>({}){<span class="ruby-operator">|</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">evname</span>), <span class="ruby-identifier">env</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">unless</span> <span class="ruby-identifier">config</span>[<span class="ruby-identifier">key</span>].<span class="ruby-identifier">nil?</span>
      <span class="ruby-keyword">case</span> <span class="ruby-constant">CONFIG_SET</span>[<span class="ruby-identifier">key</span>][<span class="ruby-value">2</span>]
      <span class="ruby-keyword">when</span> <span class="ruby-value">:path</span>
        <span class="ruby-identifier">valstr</span> = <span class="ruby-identifier">config</span>[<span class="ruby-identifier">key</span>].<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Regexp</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">inspect</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">e</span>}.<span class="ruby-identifier">join</span>(<span class="ruby-string">&#39;:&#39;</span>)
      <span class="ruby-keyword">when</span> <span class="ruby-value">:path_map</span>
        <span class="ruby-identifier">valstr</span> = <span class="ruby-identifier">config</span>[<span class="ruby-identifier">key</span>].<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&#39;:&#39;</span>)}.<span class="ruby-identifier">join</span>(<span class="ruby-string">&#39;,&#39;</span>)
      <span class="ruby-keyword">else</span>
        <span class="ruby-identifier">valstr</span> = <span class="ruby-identifier">config</span>[<span class="ruby-identifier">key</span>].<span class="ruby-identifier">to_s</span>
      <span class="ruby-keyword">end</span>
      <span class="ruby-identifier">env</span>[<span class="ruby-identifier">evname</span>] = <span class="ruby-identifier">valstr</span>
    <span class="ruby-keyword">end</span>
  }
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-new" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">new</span><span
                                class="method-args">(argv)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="new-source">
            <pre><span class="ruby-comment"># File debug-1.8.0/lib/debug/config.rb, line 67</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span> <span class="ruby-identifier">argv</span>
  <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">config</span>
    <span class="ruby-identifier">raise</span> <span class="ruby-string">&#39;Can not make multiple configurations in one process&#39;</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">config</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">parse_argv</span>(<span class="ruby-identifier">argv</span>)

  <span class="ruby-comment"># apply defaults</span>
  <span class="ruby-constant">CONFIG_SET</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">config_detail</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">unless</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">k</span>)
      <span class="ruby-identifier">default_value</span> = <span class="ruby-identifier">config_detail</span>[<span class="ruby-value">3</span>]
      <span class="ruby-identifier">config</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">parse_config_value</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">default_value</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">update</span> <span class="ruby-identifier">config</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-parse_argv" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">parse_argv</span><span
                                class="method-args">(argv)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="parse_argv-source">
            <pre><span class="ruby-comment"># File debug-1.8.0/lib/debug/config.rb, line 249</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">parse_argv</span> <span class="ruby-identifier">argv</span>
  <span class="ruby-identifier">config</span> = {
    <span class="ruby-value">mode:</span> <span class="ruby-value">:start</span>,
    <span class="ruby-value">no_color:</span> (<span class="ruby-identifier">nc</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-string">&#39;NO_COLOR&#39;</span>]) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">nc</span>.<span class="ruby-identifier">empty?</span>,
  }
  <span class="ruby-constant">CONFIG_MAP</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">evname</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">val</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-identifier">evname</span>]
      <span class="ruby-identifier">config</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">parse_config_value</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">val</span>)
    <span class="ruby-keyword">end</span>
  }
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">config</span> <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">argv</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">empty?</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">String</span>
    <span class="ruby-identifier">require</span> <span class="ruby-string">&#39;shellwords&#39;</span>
    <span class="ruby-identifier">argv</span> = <span class="ruby-constant">Shellwords</span>.<span class="ruby-identifier">split</span>(<span class="ruby-identifier">argv</span>)
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">require</span> <span class="ruby-string">&#39;optparse&#39;</span>
  <span class="ruby-identifier">require_relative</span> <span class="ruby-string">&#39;version&#39;</span>

  <span class="ruby-identifier">have_shown_version</span> = <span class="ruby-keyword">false</span>

  <span class="ruby-identifier">opt</span> = <span class="ruby-constant">OptionParser</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">banner</span> = <span class="ruby-node">&quot;#{$0} [options] -- [debuggee options]&quot;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&#39;&#39;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">version</span> = <span class="ruby-operator">::</span><span class="ruby-constant">DEBUGGER__</span><span class="ruby-operator">::</span><span class="ruby-constant">VERSION</span>

    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&#39;Debug console mode:&#39;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&#39;-n&#39;</span>, <span class="ruby-string">&#39;--nonstop&#39;</span>, <span class="ruby-string">&#39;Do not stop at the beginning of the script.&#39;</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">config</span>[<span class="ruby-value">:nonstop</span>] = <span class="ruby-string">&#39;1&#39;</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&#39;-e DEBUG_COMMAND&#39;</span>, <span class="ruby-string">&#39;Execute debug command at the beginning of the script.&#39;</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">cmd</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">config</span>[<span class="ruby-value">:commands</span>] <span class="ruby-operator">||=</span> <span class="ruby-string">&#39;&#39;</span>
      <span class="ruby-identifier">config</span>[<span class="ruby-value">:commands</span>] <span class="ruby-operator">+=</span> <span class="ruby-identifier">cmd</span> <span class="ruby-operator">+</span> <span class="ruby-string">&#39;;;&#39;</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&#39;-x FILE&#39;</span>, <span class="ruby-string">&#39;--init-script=FILE&#39;</span>, <span class="ruby-string">&#39;Execute debug command in the FILE.&#39;</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">config</span>[<span class="ruby-value">:init_script</span>] = <span class="ruby-identifier">file</span>
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&#39;--no-rc&#39;</span>, <span class="ruby-string">&#39;Ignore ~/.rdbgrc&#39;</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">config</span>[<span class="ruby-value">:no_rc</span>] = <span class="ruby-keyword">true</span>
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&#39;--no-color&#39;</span>, <span class="ruby-string">&#39;Disable colorize&#39;</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">config</span>[<span class="ruby-value">:no_color</span>] = <span class="ruby-keyword">true</span>
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&#39;--no-sigint-hook&#39;</span>, <span class="ruby-string">&#39;Disable to trap SIGINT&#39;</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">config</span>[<span class="ruby-value">:no_sigint_hook</span>] = <span class="ruby-keyword">true</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&#39;-c&#39;</span>, <span class="ruby-string">&#39;--command&#39;</span>, <span class="ruby-string">&#39;Enable command mode.&#39;</span>,
                            <span class="ruby-string">&#39;The first argument should be a command name in $PATH.&#39;</span>,
                            <span class="ruby-string">&#39;Example: \&#39;rdbg -c bundle exec rake test\&#39;&#39;</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">config</span>[<span class="ruby-value">:command</span>] = <span class="ruby-keyword">true</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&#39;&#39;</span>

    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&#39;-O&#39;</span>, <span class="ruby-string">&#39;--open=[FRONTEND]&#39;</span>, <span class="ruby-string">&#39;Start remote debugging with opening the network port.&#39;</span>,
                                    <span class="ruby-string">&#39;If TCP/IP options are not given, a UNIX domain socket will be used.&#39;</span>,
                                    <span class="ruby-string">&#39;If FRONTEND is given, prepare for the FRONTEND.&#39;</span>,
                                    <span class="ruby-string">&#39;Now rdbg, vscode and chrome is supported.&#39;</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>

      <span class="ruby-keyword">case</span> <span class="ruby-identifier">f</span> <span class="ruby-comment"># some format patterns are not documented yet</span>
      <span class="ruby-keyword">when</span> <span class="ruby-keyword">nil</span>
        <span class="ruby-identifier">config</span>[<span class="ruby-value">:open</span>] = <span class="ruby-keyword">true</span>
      <span class="ruby-keyword">when</span> <span class="ruby-regexp">/\A\d\z/</span>
        <span class="ruby-identifier">config</span>[<span class="ruby-value">:open</span>] = <span class="ruby-keyword">true</span>
        <span class="ruby-identifier">config</span>[<span class="ruby-value">:port</span>] = <span class="ruby-identifier">f</span>.<span class="ruby-identifier">to_i</span>
      <span class="ruby-keyword">when</span> <span class="ruby-regexp">/\A(\S+):(\d+)\z/</span>
        <span class="ruby-identifier">config</span>[<span class="ruby-value">:open</span>] = <span class="ruby-keyword">true</span>
        <span class="ruby-identifier">config</span>[<span class="ruby-value">:host</span>] = <span class="ruby-node">$1</span>
        <span class="ruby-identifier">config</span>[<span class="ruby-value">:port</span>] = <span class="ruby-node">$2</span>.<span class="ruby-identifier">to_i</span>
      <span class="ruby-keyword">when</span> <span class="ruby-string">&#39;tcp&#39;</span>
        <span class="ruby-identifier">config</span>[<span class="ruby-value">:open</span>] = <span class="ruby-keyword">true</span>
        <span class="ruby-identifier">config</span>[<span class="ruby-value">:port</span>] <span class="ruby-operator">||=</span> <span class="ruby-value">0</span>
      <span class="ruby-keyword">when</span> <span class="ruby-string">&#39;vscode&#39;</span>, <span class="ruby-string">&#39;chrome&#39;</span>, <span class="ruby-string">&#39;cdp&#39;</span>
        <span class="ruby-identifier">config</span>[<span class="ruby-value">:open</span>] = <span class="ruby-identifier">f</span>&amp;.<span class="ruby-identifier">downcase</span>
      <span class="ruby-keyword">else</span>
        <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Unknown option for --open: #{f}&quot;</span>
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&#39;--sock-path=SOCK_PATH&#39;</span>, <span class="ruby-string">&#39;UNIX Domain socket path&#39;</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">config</span>[<span class="ruby-value">:sock_path</span>] = <span class="ruby-identifier">path</span>
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&#39;--port=PORT&#39;</span>, <span class="ruby-string">&#39;Listening TCP/IP port&#39;</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">port</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">config</span>[<span class="ruby-value">:port</span>] = <span class="ruby-identifier">port</span>
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&#39;--host=HOST&#39;</span>, <span class="ruby-string">&#39;Listening TCP/IP host&#39;</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">host</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">config</span>[<span class="ruby-value">:host</span>] = <span class="ruby-identifier">host</span>
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&#39;--cookie=COOKIE&#39;</span>, <span class="ruby-string">&#39;Set a cookie for connection&#39;</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">config</span>[<span class="ruby-value">:cookie</span>] = <span class="ruby-identifier">c</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">rdbg</span> = <span class="ruby-string">&#39;rdbg&#39;</span>

    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&#39;&#39;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&#39;  Debug console mode runs Ruby program with the debug console.&#39;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&#39;&#39;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-node">&quot;  &#39;#{rdbg} target.rb foo bar&#39;                starts like &#39;ruby target.rb foo bar&#39;.&quot;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-node">&quot;  &#39;#{rdbg} -- -r foo -e bar&#39;                 starts like &#39;ruby -r foo -e bar&#39;.&quot;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-node">&quot;  &#39;#{rdbg} -c rake test&#39;                     starts like &#39;rake test&#39;.&quot;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-node">&quot;  &#39;#{rdbg} -c -- rake test -t&#39;               starts like &#39;rake test -t&#39;.&quot;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-node">&quot;  &#39;#{rdbg} -c bundle exec rake test&#39;         starts like &#39;bundle exec rake test&#39;.&quot;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-node">&quot;  &#39;#{rdbg} -O target.rb foo bar&#39;             starts and accepts attaching with UNIX domain socket.&quot;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-node">&quot;  &#39;#{rdbg} -O --port 1234 target.rb foo bar&#39; starts accepts attaching with TCP/IP localhost:1234.&quot;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-node">&quot;  &#39;#{rdbg} -O --port 1234 -- -r foo -e bar&#39;  starts accepts attaching with TCP/IP localhost:1234.&quot;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-node">&quot;  &#39;#{rdbg} target.rb -O chrome --port 1234&#39;  starts and accepts connecting from Chrome Devtools with localhost:1234.&quot;</span>

    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&#39;&#39;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&#39;Attach mode:&#39;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&#39;-A&#39;</span>, <span class="ruby-string">&#39;--attach&#39;</span>, <span class="ruby-string">&#39;Attach to debuggee process.&#39;</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">config</span>[<span class="ruby-value">:mode</span>] = <span class="ruby-value">:attach</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&#39;&#39;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&#39;  Attach mode attaches the remote debug console to the debuggee process.&#39;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&#39;&#39;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-node">&quot;  &#39;#{rdbg} -A&#39;           tries to connect via UNIX domain socket.&quot;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-node">&quot;  #{&#39; &#39; * rdbg.size}                If there are multiple processes are waiting for the&quot;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-node">&quot;  #{&#39; &#39; * rdbg.size}                debugger connection, list possible debuggee names.&quot;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-node">&quot;  &#39;#{rdbg} -A path&#39;      tries to connect via UNIX domain socket with given path name.&quot;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-node">&quot;  &#39;#{rdbg} -A port&#39;      tries to connect to localhost:port via TCP/IP.&quot;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-node">&quot;  &#39;#{rdbg} -A host port&#39; tries to connect to host:port via TCP/IP.&quot;</span>

    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&#39;&#39;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&#39;Other options:&#39;</span>

    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&#39;-v&#39;</span>, <span class="ruby-string">&#39;Show version number&#39;</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">puts</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">ver</span>
      <span class="ruby-identifier">have_shown_version</span> = <span class="ruby-keyword">true</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&#39;--version&#39;</span>, <span class="ruby-string">&#39;Show version number and exit&#39;</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">puts</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">ver</span>
      <span class="ruby-identifier">exit</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;-h&quot;</span>, <span class="ruby-string">&quot;--help&quot;</span>, <span class="ruby-string">&quot;Print help&quot;</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">puts</span> <span class="ruby-identifier">o</span>
      <span class="ruby-identifier">exit</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&#39;--util=NAME&#39;</span>, <span class="ruby-string">&#39;Utility mode (used by tools)&#39;</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">require_relative</span> <span class="ruby-string">&#39;client&#39;</span>
      <span class="ruby-constant">Client</span>.<span class="ruby-identifier">util</span>(<span class="ruby-identifier">name</span>)
      <span class="ruby-identifier">exit</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&#39;--stop-at-load&#39;</span>, <span class="ruby-string">&#39;Stop immediately when the debugging feature is loaded.&#39;</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">config</span>[<span class="ruby-value">:stop_at_load</span>] = <span class="ruby-keyword">true</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&#39;&#39;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&#39;NOTE&#39;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&#39;  All messages communicated between a debugger and a debuggee are *NOT* encrypted.&#39;</span>
    <span class="ruby-identifier">o</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&#39;  Please use the remote debugging feature carefully.&#39;</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">parse!</span>(<span class="ruby-identifier">argv</span>)

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">empty?</span>
    <span class="ruby-keyword">case</span>
    <span class="ruby-keyword">when</span> <span class="ruby-identifier">have_shown_version</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">config</span>[<span class="ruby-value">:mode</span>] <span class="ruby-operator">==</span> <span class="ruby-value">:start</span>
      <span class="ruby-identifier">pp</span> <span class="ruby-identifier">config</span>
      <span class="ruby-identifier">exit</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">config</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-parse_config_value" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">parse_config_value</span><span
                                class="method-args">(name, valstr)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="parse_config_value-source">
            <pre><span class="ruby-comment"># File debug-1.8.0/lib/debug/config.rb, line 208</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">parse_config_value</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">valstr</span>
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">valstr</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">valstr</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">String</span>

  <span class="ruby-keyword">case</span> <span class="ruby-constant">CONFIG_SET</span>[<span class="ruby-identifier">name</span>][<span class="ruby-value">2</span>]
  <span class="ruby-keyword">when</span> <span class="ruby-value">:bool</span>
    <span class="ruby-keyword">case</span> <span class="ruby-identifier">valstr</span>
    <span class="ruby-keyword">when</span> <span class="ruby-string">&#39;1&#39;</span>, <span class="ruby-string">&#39;true&#39;</span>, <span class="ruby-string">&#39;TRUE&#39;</span>, <span class="ruby-string">&#39;T&#39;</span>
      <span class="ruby-keyword">true</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-keyword">false</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:int</span>
    <span class="ruby-identifier">valstr</span>.<span class="ruby-identifier">to_i</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:loglevel</span>
    <span class="ruby-keyword">if</span> <span class="ruby-constant">DEBUGGER__</span><span class="ruby-operator">::</span><span class="ruby-constant">LOG_LEVELS</span>[<span class="ruby-identifier">s</span> = <span class="ruby-identifier">valstr</span>.<span class="ruby-identifier">to_sym</span>]
      <span class="ruby-identifier">s</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Unknown loglevel: #{valstr}&quot;</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:forkmode</span>
    <span class="ruby-keyword">case</span> <span class="ruby-identifier">sym</span> = <span class="ruby-identifier">valstr</span>.<span class="ruby-identifier">to_sym</span>
    <span class="ruby-keyword">when</span> <span class="ruby-value">:parent</span>, <span class="ruby-value">:child</span>, <span class="ruby-value">:both</span>, <span class="ruby-keyword">nil</span>
      <span class="ruby-identifier">sym</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;unknown fork mode: #{sym}&quot;</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:path</span> <span class="ruby-comment"># array of String</span>
    <span class="ruby-identifier">valstr</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp">/:/</span>).<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span>
      <span class="ruby-keyword">if</span> <span class="ruby-regexp">/\A\/(.+)\/\z/</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">e</span>
        <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">compile</span> <span class="ruby-node">$1</span>
      <span class="ruby-keyword">else</span>
        <span class="ruby-identifier">e</span>
      <span class="ruby-keyword">end</span>
    }
  <span class="ruby-keyword">when</span> <span class="ruby-value">:path_map</span>
    <span class="ruby-identifier">valstr</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&#39;,&#39;</span>).<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&#39;:&#39;</span>)}
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">valstr</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-5B-5D" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">[]</span><span
                                class="method-args">(key)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="5B-5D-source">
            <pre><span class="ruby-comment"># File debug-1.8.0/lib/debug/config.rb, line 89</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">[]</span>(<span class="ruby-identifier">key</span>)
  <span class="ruby-identifier">config</span>[<span class="ruby-identifier">key</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-5B-5D-3D" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">[]=</span><span
                                class="method-args">(key, val)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="5B-5D-3D-source">
            <pre><span class="ruby-comment"># File debug-1.8.0/lib/debug/config.rb, line 93</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">[]=</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">val</span>)
  <span class="ruby-identifier">set_config</span>(<span class="ruby-identifier">key</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">val</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-append_config" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">append_config</span><span
                                class="method-args">(key, val)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="append_config-source">
            <pre><span class="ruby-comment"># File debug-1.8.0/lib/debug/config.rb, line 110</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">append_config</span> <span class="ruby-identifier">key</span>, <span class="ruby-identifier">val</span>
  <span class="ruby-identifier">conf</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">dup</span>

  <span class="ruby-keyword">if</span> <span class="ruby-constant">CONFIG_SET</span>[<span class="ruby-identifier">key</span>]
    <span class="ruby-keyword">if</span> <span class="ruby-constant">CONFIG_SET</span>[<span class="ruby-identifier">key</span>][<span class="ruby-value">2</span>] <span class="ruby-operator">==</span> <span class="ruby-value">:path</span>
      <span class="ruby-identifier">conf</span>[<span class="ruby-identifier">key</span>] = [<span class="ruby-operator">*</span><span class="ruby-identifier">conf</span>[<span class="ruby-identifier">key</span>], <span class="ruby-operator">*</span><span class="ruby-identifier">parse_config_value</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">val</span>)];
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;not an Array type: #{key}&quot;</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Unknown configuration: #{key}&quot;</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">update</span> <span class="ruby-identifier">conf</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-inspect" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">inspect</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="inspect-source">
            <pre><span class="ruby-comment"># File debug-1.8.0/lib/debug/config.rb, line 85</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">inspect</span>
  <span class="ruby-identifier">config</span>.<span class="ruby-identifier">inspect</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-set_config" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">set_config</span><span
                                class="method-args">(**kw)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="set_config-source">
            <pre><span class="ruby-comment"># File debug-1.8.0/lib/debug/config.rb, line 97</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">set_config</span>(<span class="ruby-operator">**</span><span class="ruby-identifier">kw</span>)
  <span class="ruby-identifier">conf</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">kw</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">if</span> <span class="ruby-constant">CONFIG_MAP</span>[<span class="ruby-identifier">k</span>]
      <span class="ruby-identifier">conf</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">parse_config_value</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span>) <span class="ruby-comment"># TODO: ractor support</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Unknown configuration: #{k}&quot;</span>
    <span class="ruby-keyword">end</span>
  }

  <span class="ruby-identifier">update</span> <span class="ruby-identifier">conf</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-update" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">update</span><span
                                class="method-args">(conf)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="update-source">
            <pre><span class="ruby-comment"># File debug-1.8.0/lib/debug/config.rb, line 126</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">update</span> <span class="ruby-identifier">conf</span>
  <span class="ruby-identifier">old_conf</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-value">:@config</span>) <span class="ruby-operator">||</span> {}

  <span class="ruby-comment"># TODO: Use Ractor.make_shareable(conf)</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-value">:@config</span>, <span class="ruby-identifier">conf</span>.<span class="ruby-identifier">freeze</span>)

  <span class="ruby-comment"># Post process</span>
  <span class="ruby-identifier">if_updated</span> <span class="ruby-identifier">old_conf</span>, <span class="ruby-identifier">conf</span>, <span class="ruby-value">:keep_alloc_site</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">old</span>, <span class="ruby-identifier">new</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">new</span>
      <span class="ruby-identifier">require</span> <span class="ruby-string">&#39;objspace&#39;</span>
      <span class="ruby-constant">ObjectSpace</span>.<span class="ruby-identifier">trace_object_allocations_start</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-keyword">if</span> <span class="ruby-identifier">old</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">new</span>
      <span class="ruby-constant">ObjectSpace</span>.<span class="ruby-identifier">trace_object_allocations_stop</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">if_updated</span> <span class="ruby-identifier">old_conf</span>, <span class="ruby-identifier">conf</span>, <span class="ruby-value">:postmortem</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">_</span>, <span class="ruby-identifier">new_p</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">if</span> <span class="ruby-keyword">defined?</span>(<span class="ruby-constant">SESSION</span>)
      <span class="ruby-constant">SESSION</span>.<span class="ruby-identifier">postmortem</span> = <span class="ruby-identifier">new_p</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">if_updated</span> <span class="ruby-identifier">old_conf</span>, <span class="ruby-identifier">conf</span>, <span class="ruby-value">:sigdump_sig</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">old_sig</span>, <span class="ruby-identifier">new_sig</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">setup_sigdump</span> <span class="ruby-identifier">old_sig</span>, <span class="ruby-identifier">new_sig</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">if_updated</span> <span class="ruby-identifier">old_conf</span>, <span class="ruby-identifier">conf</span>, <span class="ruby-value">:no_sigint_hook</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">old</span>, <span class="ruby-identifier">new</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">if</span> <span class="ruby-keyword">defined?</span>(<span class="ruby-constant">SESSION</span>)
      <span class="ruby-constant">SESSION</span>.<span class="ruby-identifier">set_no_sigint_hook</span> <span class="ruby-identifier">old</span>, <span class="ruby-identifier">new</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="private-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Private Instance Methods</h3>
                </header>

                  <div id="method-i-config" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">config</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="config-source">
            <pre><span class="ruby-comment"># File debug-1.8.0/lib/debug/config.rb, line 200</span>
        <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">config</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">config</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-disable_sigdump" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">disable_sigdump</span><span
                                class="method-args">(old_sig)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="disable_sigdump-source">
            <pre><span class="ruby-comment"># File debug-1.8.0/lib/debug/config.rb, line 182</span>
        <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">disable_sigdump</span> <span class="ruby-identifier">old_sig</span>
  <span class="ruby-identifier">trap</span>(<span class="ruby-identifier">old_sig</span>, <span class="ruby-ivar">@sigdump_sig_prev</span>)
  <span class="ruby-ivar">@sigdump_sig_prev</span> = <span class="ruby-keyword">nil</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-enable_sigdump" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">enable_sigdump</span><span
                                class="method-args">(sig)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="enable_sigdump-source">
            <pre><span class="ruby-comment"># File debug-1.8.0/lib/debug/config.rb, line 166</span>
        <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">enable_sigdump</span> <span class="ruby-identifier">sig</span>
  <span class="ruby-ivar">@sigdump_sig_prev</span> = <span class="ruby-identifier">trap</span>(<span class="ruby-identifier">sig</span>) <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">str</span> = []
    <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;Simple sigdump on #{Process.pid}&quot;</span>
    <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">list</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">th</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;Thread: #{th}&quot;</span>
      <span class="ruby-identifier">th</span>.<span class="ruby-identifier">backtrace</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">loc</span><span class="ruby-operator">|</span>
        <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;  #{loc}&quot;</span>
      }
      <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&#39;&#39;</span>
    }

    <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">str</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-if_updated" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">if_updated</span><span
                                class="method-args">(old_conf, new_conf, key) { |old, new| ... }</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="if_updated-source">
            <pre><span class="ruby-comment"># File debug-1.8.0/lib/debug/config.rb, line 161</span>
        <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">if_updated</span> <span class="ruby-identifier">old_conf</span>, <span class="ruby-identifier">new_conf</span>, <span class="ruby-identifier">key</span>
  <span class="ruby-identifier">old</span>, <span class="ruby-identifier">new</span> = <span class="ruby-identifier">old_conf</span>[<span class="ruby-identifier">key</span>], <span class="ruby-identifier">new_conf</span>[<span class="ruby-identifier">key</span>]
  <span class="ruby-keyword">yield</span> <span class="ruby-identifier">old</span>, <span class="ruby-identifier">new</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">old</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">new</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-parse_config_value" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">parse_config_value</span><span
                                class="method-args">(name, valstr)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="parse_config_value-source">
            <pre><span class="ruby-comment"># File debug-1.8.0/lib/debug/config.rb, line 204</span>
        <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">parse_config_value</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">valstr</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">parse_config_value</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">valstr</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-setup_sigdump" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">setup_sigdump</span><span
                                class="method-args">(old_sig = nil, sig = CONFIG[:sigdump_sig])</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>emergency simple sigdump. Use ‘sigdump` gem for more rich features.</p>

                              <div class="method-source-code" id="setup_sigdump-source">
            <pre><span class="ruby-comment"># File debug-1.8.0/lib/debug/config.rb, line 189</span>
        <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">setup_sigdump</span> <span class="ruby-identifier">old_sig</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">sig</span> = <span class="ruby-constant">CONFIG</span>[<span class="ruby-value">:sigdump_sig</span>]
  <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">old_sig</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">sig</span>
    <span class="ruby-identifier">enable_sigdump</span> <span class="ruby-identifier">sig</span>
  <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">old_sig</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">sig</span>
    <span class="ruby-identifier">disable_sigdump</span> <span class="ruby-identifier">old_sig</span>
  <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">old_sig</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">sig</span>
    <span class="ruby-identifier">disable_sigdump</span> <span class="ruby-identifier">old_sig</span>
    <span class="ruby-identifier">enable_sigdump</span> <span class="ruby-identifier">sig</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is a service of <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>, purveyors of fine <a href='https://jamesbritt.bandcamp.com/'>dance noise</a></p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

